/**
 * Created by Administrator on 2017/7/14 0014.
 */

"use strict";

angular.module('app.project').controller('ProjectModelCtrl', function ($scope, userHttpS, projectHttpS, $cookieStore,Restangular) {
	
    $scope.temp_level = 'temp_level';

    $("#my_sele").change(function(){
        if ( $(this).val() == 'temp_level' ){
            window.location.href = appConfig.base[0].baseURI + "#/projecttemplate/Overall_design";
        }else if( $(this).val() == 'temp_level_2' ){
            window.location.href = appConfig.base[0].baseURI + "#/myallprojects";
        }else{
            window.location.href = appConfig.base[0].baseURI + "#/myallprojects";
        }
    })

    //廒间列表
    //配置分页基本参数
    $scope.paginationConf = {
        currentPage: 1,
        itemsPerPage: 10,
        pagesLength: 5,
        totalItems: 20,
        perPageOptions: [10, 20, 30, 40, 50],

        onChange: function () {
        }
    }

    // var params = {kddm: 1, ajbh: ""};
    // Restangular.one('data', 'Get_SeparateSpaceBaseInfoData').getList().then(function(res) {
    //     $scope.list =res;
    //     // console.log(res)
    //     console.log(res.length)
    //     $scope.paginationConf.totalItems = res.length;
    // });
    // $scope.sends = function() {
    //   console.log($scope.ajbh);

    // }
    // $scope.$watch('paginationConf.currentPage + paginationConf.itemsPerPage',$scope.sends);  分页？分页查看数据？

    

    
});